Generate HTML template for simple forms (Internal method).

<div class="definition">
    generateHTML()
</div>

Returns HTML text.

<h4>Description</h4>

In many cases the HTML template for the form is very typical - fields in one column, may be a few tabs. Instead of
creating many HTML files with this typical HTML template, they can be generated at run-time. The <span class="argument">generateHTML</span>
is an internal method and gets called when no HTML template is defined. First the form will check <a class="argument" href="w2form.formURL">.formURL</a>,
<a class="argument" href="w2form.formHTML">.formHTML</a>, and innerHTML of the <a class="argument" href="w2form.box">.box</a>. If
no HTML template is defined it will be generated.
<div style="height: 10px"></div>

The method will loop through all the <a class="argument" href="w2form.fields">.fields</a> and <a class="argument" href="w2form.actions">.actions</a>
to generate HTML template. It will use <span class="argument">html</span> property of the field if it is defined. It can have following structure:
<textarea class="javascript">
html = {
    caption : '',   // caption for the field
    group   : '',   // if not empty then starts a group before field
    attr    : '',   // additional attributes inside &lt;input&gt; control
    span    : 6,    // number 1-9 that defined with of the caption span
    text    : '',   // any html that will be placed after the input control
    page    : 0     // page number control belongs to
}
</textarea>

You should not call this method directly. The following is the example how to use it
<textarea class="javascript">
let form = new w2form({
    name     : 'form',
    fields: [
        { field: 'field.text', type: 'text', required: true,
            html: { text: 'Field 1', attr: 'size="40"', span: 5 }
        },
        { field: 'field.alpha', type: 'alphanumeric', required: true,
            html: { text: 'Field 2', attr: 'size="40"', span: 5 }
        },
        { field: 'field.int', type: 'int', required: true
            html: { text: 'Field 3', attr: 'size="40"', span: 5 }
        }
    ],
    actions: {
        Reset() {},
        Save() {}
    }
});
</textarea>